package com.easychat.entity.enums;

/**
 * @Author: yudaxian
 * @Description: TODO
 * @DateTime: 2024/8/21 22:18
 **/
public enum MessageStatusEnum {
    SENDING(0, "发送中"),
    SENDED(1, "已发送")
    ;

    private Integer status;

    private String desc;

    MessageStatusEnum(Integer status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static MessageStatusEnum getByStatus(Integer status) {
        for (MessageStatusEnum messageStatusEnum : values()) {
            if (messageStatusEnum.getStatus().equals(status)) {
                return messageStatusEnum;
            }
        }
        return null;
    }

    public String getDesc() {
        return desc;
    }

    public Integer getStatus() {
        return status;
    }
}
